package com.huilang.demo1;
/**
 * @version v1.0
 * @ClassName: AbstractBox
 * @Description: 享元模式
 */
public class Client {
    public static void main(String[] args) {
        BoxFactory factory = BoxFactory.getInstance();
        AbstractBox box = factory.getBox("I");
        AbstractBox box1 = factory.getBox("I");
        box.display("灰色");
        box.display("蓝色");
        System.out.println(box==box1);

    }
}
